# Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=glances
pkgver=3.3.1.1
pkgrel=4
pkgdesc='CLI curses-based monitoring tool'
arch=('any')
url='https://nicolargo.github.io/glances/'
license=('LGPL')
makedepends=('python-setuptools')
depends=('python' 'python-psutil' 'python-future' 'python-defusedxml' 'python-ujson')
optdepends=('hddtemp: HDD temperature monitoring support'
            'python-bottle: web server support'
            'python-docker: for the Docker monitoring support'
            'python-matplotlib: for graphical/chart support'
            'python-netifaces: for the IP plugin'
            'python-zeroconf: for the autodiscover mode'
            'python-pystache: templating engine'
            'python-prometheus_client: for the Prometheus export module')
source=("${pkgname}-${pkgver}-${pkgrel}.tar.gz::https://github.com/nicolargo/glances/archive/v${pkgver}.tar.gz"
        'glances.service')
sha512sums=('c8aab6b7140eabfcbe3488fe18f5e8a19f5c5ec822b0f13bbafe312f58f55126fb61d78ab117466a5e479cf7517e11ffc2c19269de51830f28025a2b0ed68285'
            '49f0d185a37a5c5837e5beb463770c943ede40b2f1b8405e338129e897e97d9fc58373a8586fabc506266e6343cfea3c91b9787ac6832cc97a1ab63d6ad058d4')
b2sums=('9956ded1c4b5fd1ade9f658a612c2a208bbe933eb759fab9e62eac9b380575019c7bd18bfb70d60caa958fe40642f09ca537c352ccff2d92a99e79507cd5f4d8'
        'ecc44f8c06b1e8624cec92e41422a65d11e024b9fc23bae09b4e52fbedeb172a5034e5b612bbff7ba93d45189fb25eda0d54bc47b22b7f3f0acba984391e4017')

package() {
  cd "glances-${pkgver}"
  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
  install -Dm644 "${srcdir}"/glances.service \
    "${pkgdir}"/usr/lib/systemd/system/glances.service
}

# vim:set ts=2 sw=2 et:
